One increasingly important application area for data processing units which are implemented as integrated circuits is rendering 3D graphics. Typically the 3D graphics rendering process consists of several tasks. Rendering process starts from high level application data which describes the scene to be rendered as a collection of objects. These objects are then translated to a suitable co-ordinate space for the rendering system and their different attribute values are computed. The translated object information is then converted in a process called rasterization to a set of data values for each pixel on the screen covered by the object.
In a typical implementations the object is represented with a set of polygons, for example triangles. For each corner (vertex) of the polygon the values for the pixel parameters are determined based on the object and environment properties. Then for each pixel in the polygon area the pixel parameters are generated either by linear interpolation or preferably using perspective correct interpolation.
The data values for each pixel can represent the color values corresponding to the pixel, X and Y co-ordinates of the pixel, a Z value which represent the pixel depth on the screen, and one or more surface map (texture) co-ordinate sets.
The last step of the rendering process assembles and combines this data stream with existing graphics state in order to create the final pixel values. The assembly process for a single pixel depends usually from several parameters, and also from the data of the pixels which have been previously rendered on the screen.
There has been provided some methods like texture mapping to improve image realism in prior art 3D graphics systems. Environment mapping is a technique for modelling the effect of the surrounding light sources on a diffuse surface, and generally the environment of a reflecting surface. It is based on creating a texture map representing the environment of the object to be rendered. This texture map can be created for example by doing a spherical projection of the environment, such as other objects and light sources on the scene.
Unlike a typical texture map this map does not have a fixed mapping to the object surface. Instead the co-ordinates for the texture map point which is to be mapped to the point in the object surface is determined dynamically. This mapping is typically based on the normal vectors of the surface. For example if a spherical projection environment map and a diffuse lighting model on the surface are used then the correct environment map co-ordinate of each point of the surface is directly the normal vector of the surface at that point, if the normal vector is represented using spherical co-ordinates. For fully reflecting surface the correct co-ordinate vector is obtained by mirroring the vector representing the direction of the observer from the surface point with the surface normal vector.
Typically it is valid to approximate the mapping described above, by just determining the correct environment map co-ordinates for each vertex of the polygons forming the surface, and by using linear or perspective correct interpolation between those co-ordinates.
As described above the environment mapping process is suitable for rendering smooth surfaces. For rendering realistic scenes a technique called bump mapping is used.
In bump mapping an additional, preferably two-dimensional texture map is associated with the surface. This so called bump map contains information on how the environment map co-ordinates corresponds to the surface having different surface normal vectors on different surface locations, creating an impression of a rough surface. The principle of bump mapping is described for example in a publication of Addison Wesley publishing company: "Fundamentals of three-dimensional Computer Graphics" written by Alan Watt, 1989.
In typical implementation it is also needed to specify somehow the orientation of the bump map. This is because if we observe a surface which is basically flat but with the bumps and if the surface is rotated using its main normal vector as the rotation axis, the visual effect of the bumps changes as the surface is rotated. Without specifying the bump map direction this can not be achieved in the rendering process. This is achieved by basing the perturbation on a co-ordinate system based on local surface derivatives.
In a typical scene for example the left and right edges of an object reflect the environment from almost opposite directions. This causes that the objects covers a large area of the total environment map. Because of this the bump map orientations on the different areas of the object can also be widely different.
It is possible to specify a single direction for each polygon forming the surface. This can lead to relatively simple implementation and it has been used in some prior art graphics systems, but it also leads to annoying artefacts on the areas where the different (adjacent) polygons meet on the object surfaces, carrying different bump map directions.
The bump mapping process is normally implemented by precalculation in a look up table which is preferably stored in read/write memory (RAM, Random Access Memory).
A European patent application EP 764 921 describes a computer graphics circuit to render image of light reflected shading. The bump normal is defined with two-dimensional pattern and stored in memory device. It is mapped onto the surface of arbitrary direction. Bump mapping rotates the surface normal (angle) with a bump normal. Interpolation for polygon filling is applied to the co-ordinates, texture mapping address, surface angle, and light-source angle (in a multiple light-source system). The bump-pattern is allocated in two dimensional u, v co-ordinates with a functional variable defined by horizontal and vertical angles, Bh and Bv, relative to the axis perpendicular to u, v co-ordinates. This pattern is stored in the read/write memory. This circuit still has the disadvantage mentioned above that the bump map normals with adjacent polygons may have significantly different directions especially on curved surfaces which leads to annoying artefact on such areas.